package com.qf.bookmanage.mapper;

import com.qf.bookmanage.entity.Book;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;

import java.util.HashMap;
import java.util.List;

/**
 * <p>
 *  Mapper 接口
 * </p>
 *
 * @author dongjl
 * @since 2023-11-23
 */
@Mapper
public interface BookMapper extends BaseMapper<Book> {

    // @Param("bookid")这个注解的作用，使得该方法对应的sql语句中可以使用bookid接收参数
    public abstract Book findBookById(@Param("bookid") Integer bookid);


    public abstract List<HashMap<String,Object>> groupAge();

    public abstract Long deleteBookById(@Param("bookid") Integer bookid);
}
